<?

	/* Theme functions, these are called from the main theme or the blog system */
	
	
	function drawProfile() {
		global $blogname,$profileimg;
		
		echo "\r\n";
		echo "\t<div id='profile'>\r\n";
		if ($profileimg) echo "\t\t<img src='".$profileimg."'/>\r\n";
		echo "\t\t<h1><a href='?'>".$blogname."</a></h1>";
		echo "\r\n";
		echo "\t</div>";
		echo "<div style='clear:both;'> </div>";
	}

	$groupDate="";	

	function theme_drawTweet(
			$itemAction,
			$itemCaption,
			$itemPost,
			$itemLink,
			$itemCommentLink,
			$itemDate,
			$itemServiceName,
			$itemTrueDate)
	{
			global $groupDate;
			$tweet="";
			
			$capdate=date("Ymd",$itemTrueDate);
			

                       $tweet.="<div class='sidedate'>";
						if ($capdate!=$groupDate) {
							$groupDate=$capdate;
							$tweet.="<label><span>".substr(date("F",$itemTrueDate),0,3)."<br/>".date("Y",$itemTrueDate)."</span>".date("j",$itemTrueDate)."</label> ";
						}
						$tweet.="<small>".date("H:i",$itemTrueDate)."</small>";
                       $tweet.="</div>";
	
						$tweet.="<div id='tweet'>";

						$tweet.=$itemPost;
						if ($itemCaption) $tweet.="<h1>".$itemCaption."<a href='".$itemLink."'>&#187;</a></h1>";
						
						$tweet.="<br/>".$itemAction."<br/>";
						//$tweet.="From ".$itemServiceName." - ".$itemDate." | ".$itemCommentLink."<br/><br/>";
						
						
						$tweet.="</div>";
						$tweet.="<div style='clear:both;'> </div>";
						return $tweet;
	}



?>
